package me.sealer.event.publisher;

import me.sealer.event.DemoEvent;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Created by sealer on 09-09-2017.
 */
@Component
public class DemoPublisher {
    @Resource
    private ApplicationContext applicationContext;

    public void publish(String message) {
        applicationContext.publishEvent(new DemoEvent(this, message));
    }

}
